package com.example.mywechat;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

public class SettingFragment extends Fragment {

    public SettingFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.setting_fragment, container, false);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        Button pyqBtn = (Button) getActivity().findViewById(R.id.pyqBtn);
        pyqBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
            //从fragment跳转到activity中
            startActivity(new Intent(getActivity(), PyqActivity.class));
            }
        });

    }

}
